1. Field of the Invention
The invention concerns object-oriented programming systems generally and more particularly concerns libraries for use in object-oriented graphics programming.
2. Description of the Prior Art
Graphical user interfaces have made computer systems far easier to use. In a typical graphical user interface, the display is divided into one or more windows. Each window corresponds to an activity being carried on by the user of the system, and the user can manipulate the windows and theft contents by means of a pointing device such as a mouse and/or the keyboard. A system with a graphical user interface is easier to use than a system with the old command-line interface because there is no need for the user to remember commands and file names and type them in or to remember the context in which he is working. Instead, the entire context is visible in the display, and the user simply uses his pointing device to select items on the display and thereby to specify the desired operation.
An important class of graphical user interfaces is graphical user interfaces used to visualize data. For example, a program may permit the user to investigate how one or more sets of statistics are associated with states in the United States. The graphical user interface for the program consists of a map of the United States and a selector bar in which values of a statistic are mapped to colors. When the mouse is used to select an area of the selector bar, the states for which the statistic is in the selected range(s) take on the color corresponding to the value of the statistic for the state. Such a graphical user interface is disclosed in S. G. Eick, J. L. Steffan and E. E. Sumner Jr. "Seesoft--A Tool For Visualizing Line Oriented Software Statistics", IEEE Transactions On Software Engineering, vol. 18 #11, November 1992
While a graphical user interface is easier to use than the old command-line interface, programs with graphical user interfaces are far larger and more complex than programs written for the old command-line interface. Developing programs with graphical user interfaces thus takes longer, the programs require more storage space, and fast execution requires a more powerful processor.
Computer scientists have dealt with the problems of programming for the graphical user interface in two ways: by developing libraries of components of graphical user interface programs and by using object-oriented programming systems to write graphical user interface programs. When a library of components is available, the programmer can use components from the library in his program, and thus avoid having to write and debug them himself. An example of such a library of components is the X Window Tool Kit, which is part of the the X Window System, produced by the X Consortium ( X Window System is a Trademark of the Massachusetts Institute of Technology). The system is described in O. Jones, Introduction to the X Window System Prentice Hall, 1989
Object-oriented programming systems employ programming languages which permit the definition of objects. An object is simply an entity which is manipulated by the program. Each object has a class, which defines all of the operations which are permitted on the object. There are objects with built-in classes and objects whose classes are defined by the programmer. For example, an integer variable is an object with the built-in integer class. The operations of the integer class include addition, subtraction, multiplication and the modulus operation, but not division, since division may not have an integer result. The programmer may define his own classes in terms of the built-in classes and other previously-defined classes.
In defining a class, the programmer specifies how each of the operations for the class is to be performed. For example, a programmer may define a class whose objects are windows. Operations for objects having such a class may include making and destroying the window, exposing the window on the display, resizing the window, and clearing the window, and the programmer must specify how each of these operations is to be performed.
Object-oriented programming systems provide two important advantages: first, the entities which the program manipulates (for example, windows) appear directly in the program, so the program is both easier to write and easier to understand. Second, the class definitions permit the programming system to detect many programming errors which would otherwise only come to light when the program malfunctioned. An example of such an object-oriented programming system is the C++ language and compiler, as described in Stanley B. Lippman, C++ Primer, 2nd edition, Addison-Wesley Publishing Co., Reading, Mass., 1991.
Of course, libraries may be used in object-oriented programming systems. Existing libraries such as the X Window Tool Kit mentioned above may be adapted for use in object-oriented programming systems and C++ libraries for programming graphical user interfaces have also been developed. A commercially-available example of such a library is the the XVT Portability Toolkit from XVT Software Inc.
Existing libraries for programming graphical user interfaces are useful, but have a number of difficulties. First, they provide the programmer with a collection of predefined classes, rather than permitting the programmer to define his own classes. Second, because the classes are predefined, they must be general purpose. Each class must have many operations and a given operation must deal with many situations. As a result, the classes are hard for the programmer to understand, the code for the operations is long and complex, and execution is relatively slow. Third, as complex as the operations are, they often still do not exactly fit what the programmer wants to do, and only limited tailoring is possible. This drawback is particularly important when the programmer is designing truly new graphical user interfaces, such as those used in data visualization, instead of implementing variations on existing graphical user interfaces. Fourth, libraries and programming tools are generally provided as packages, and consequently, different libraries and tool sets are frequently incompatible. Finally, none of the existing libraries is well adapted to producing graphical user interfaces for visualizing data.
It is an object of the invention disclosed herein to provide a solution to these and other difficulties of existing libraries for programming graphical user interfaces.